package com.hxd.otc.common.enums;

import android.text.TextUtils;

/**
 * Created by lzy on 2018/12/14 0014.
 * description ${便利服务条目类型}
 */
public enum ConvenienceBusinessTypeEnum {
    PHONE("1"),//手机充值
    GAS("2"),//油卡充值
    LIVING("3"),//生活缴费
    VIDEO("4"),//视频充值
    OTHER("-1");//其他

    private final String mValue;

    ConvenienceBusinessTypeEnum(String value) {
        mValue = value;
    }

    public String getValue() {
        return mValue;
    }

    public static ConvenienceBusinessTypeEnum getInstance(String value) {
        if (TextUtils.isEmpty(value)) return OTHER;
        switch (value) {
            case "1":
                return PHONE;
            case "2":
                return GAS;
            case "3":
                return LIVING;
            case "4":
                return VIDEO;
            default:
                return OTHER;
        }
    }
}
